package com.client1.controller;

import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

// @RequestMapping("/")
@RestController
public class TestController {

    @GetMapping("needAuth")
    public String needAuth() {
        return "这是一个需要授权才能看的资源";
    }

    @GetMapping("user")
    public Authentication authentication(Authentication authentication) {
        return authentication;
    }
}
